import java.util.Scanner;

class satu extends dua
{
	int deret;
	satu(int deret)
	{
		this.deret=deret;
		kesatu();
	}
	void kesatu()
	{
			for(int i=n;i>0;i--)
			{
				for(int j=0;j<n-i;j++)
					System.out.print(" ");
					System.out.print(i);
				for(int k=0;k<n;k++)
					System.out.print(" ");
				for(int l=0;l<i;l++)
					System.out.print(" ");
					System.out.println();
			}
			if(n>1)
			{
				for(int i=2;i<=n;i++)
				{
					for(int j=0;j<n-i;j++)
						System.out.print(" ");
						System.out.print(i);
					for(int k=0;k<n;k++)
						System.out.print(" ");
					for(int l=0;l<i;l++)
						System.out.print(" ");
						System.out.println();
				}
			}
		}
		
class dua 
{
	void dua (int i)
	{
		if(i%2==0&&i%3==0)System.out.print(i+"");
	}
}		
public class bintang
{
	public static void main(String[]args)throws Exception
	{	{
	DataInputStream in = new DataInputStream(System.in);
	System.out.print("\n******PROGRAM BINTANG******");
	System.out.print("\nMasukkan angka : ");
		int n=Integer.parseInt(in.readLine());    	
    	dua d = new dua(n);
    	System.out.println(" ");
       	d.cetak2(); 	
       	System.out.println();
    }
}
	}
}
		
		
		
		
		
		
		
		
		
		
	}
	public static void main(String[]args)throws Exception
	{
		DataInputStream key=new DataInputStream(System.in);
		try
		{
			System.out.print("Masukkan banyak data: ");
			int n=Integer.parseInt(key.readLine());
			for(int i=n;i>0;i--)
			{
				for(int j=0;j<n-i;j++)
					System.out.print(" ");
					System.out.print(i);
				for(int k=0;k<n;k++)
					System.out.print(" ");
				for(int l=0;l<i;l++)
					System.out.print(" ");
					System.out.println();
			}
			if(n>1)
			{
				for(int i=2;i<=n;i++)
				{
					for(int j=0;j<n-i;j++)
						System.out.print(" ");
						System.out.print(i);
					for(int k=0;k<n;k++)
						System.out.print(" ");
					for(int l=0;l<i;l++)
						System.out.print(" ");
						System.out.println();
				}
			}
		}
		catch(Exception err)
		{
			System.out.println("Ma'af, Inputan salah..!!");
		}
		System.out.println();
	}
}